import Vue from 'vue'
import App from './App'
import graceUIRequest from './graceUI/jsTools/request.js'

Vue.config.productionTip = false;


Vue.prototype.setData   = function(data, thisObj){
	for(let k in data){
		thisObj[k] = data[k];
	}
}
Vue.prototype.checkLogin = function(backPage,backType){
    var SUID  = uni.getStorageSync("SUDID"); //uid
	var SRAND = uni.getStorageSync("SRAND");//随机数
	var SNAME= uni.getStorageSync("SNAME");//名字
	var SFACE = uni.getStorageSync("SFACE");//头像
	if(SUID=="" || SRAND=="" || SNAME=="" || SFACE=="" ){
		uni.redirectTo({url:"/pages/login/login?backPage="+backPage+'&backtype='+backType})
		return false;
	}		
	return [SUID,SRAND,SNAME,SFACE]
}

Vue.prototype.gRequest = graceUIRequest;

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
